home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
prg_basi
/
n_b-v200.zip
/
NBV2
/
DMO
/
ARROWS.DMO
< prev
next >
Wrap
Text File
|
1996-03-11
|
4KB
|
66 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME ARROWS .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
In graphics mode arrows get pretty important so here is the routine to put
all those little darts on the screen. They can be put in any one of eight
sizes and can be loners or in groups. As arrows seem to live in boxes and
buttons this routine will center your arrow(s) inside the box you've given
them to live in.
There are 8 arrows and each has it's number:
1 = up 5 = up/left
2 = down 6 = up/right
3 = left 7 = down/right
4 = right 8 = down/left
There is also an ArrowsA routine if you're using Event Arrays
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
'┌────────────────────────────
$INCLUDE "DAS-NB01.INC" '│
$INCLUDE "DAS-NBV1.INC" '│
$INCLUDE "DAS-NBV2.INC" '│
'│
CLS '│ set-up the VGA screen
SCREEN 12 '│
GraphicSETUP '│
fLoadDAScolor '│ load 3D colors
'│
DIM UDLR?(8) '│ our arrow numbers
FOR X% = 1 TO 8 '│
READ UDLR?(X%) '│
NEXT '│
DATA 5, 3, 8, 1, 2, 6, 4, 7 '│
'│
FOR X1% = 0 TO 64 STEP 32 '│ draw 9 boxes in a 3x3 grid
X2% = ( X1% + 32 ) '│
FOR Y1% = 0 TO 64 STEP 32 '│
Y2% = ( Y1% + 32 ) '│
GBoxBEVEL X1%, Y1%, X2%, Y2%, 4, 4, 9, 14 '│ draw the box
IF (X1% = 32) AND (Y1% = 32) THEN ITERATE '│ (center box - no arrow)
INCR D?, 1 '│ next arrow number
Arrows X1%,Y1%,X2%,Y2%,15,UDLR?(D?),2,1 '│ draw a 2x black arrow
NEXT '│
NEXT '│
'│
GBoxBEVEL 0, 96, 96, 120, 4, 3, 8, 13 '│ the blue box on the bottom
Arrows 0, 96, 96, 120, 0, 2, 1, 4 '│ 4 little white down arrows
'│
fAnyKey : PALETTE : SCREEN 0 : END '│ a clean exit
'└────────────────────────────